<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="../../js库/mock.js"></script>
    <script src="../../js库/vue.js"></script>
    <title>vertical-align的使用</title>
    <style>
        /* 
            vertical-align
                经常用于设置图片或者表单元素(行内块元素)和文字垂直对齐
                    baseline
                    top
                    middie
                    bottom
        */
      
        .button {
            width: 200px;
            height: 50px;
            background-color: pink;
            border-radius: 25px;
           
        }
        .button>img {
            width: 30px;height: 30px;
            vertical-align: middle;
            margin: 10px 0 10px 20px;
        }
        .button span {
            display: inline-block;
            margin-left: 20px;
        }
        div.img {
            border: solid 1px red;
        }
        img {
            vertical-align: middle;
        }
    </style>
</head>

<body>
    <div id="root">
        <div class="img">
            <!-- 行内块元素默认和文字是为基线对齐而边框要包含文字最下面 所以有空白缝隙 -->
            <img src="../../ohter/picture/2.jpg" alt="">ertfgevf
        </div>

    
    <div class="button">
        <img src="../../ohter/picture/1.jpg" alt=""><span>rgtrgff</span>
    </div>

    </div>
</body>
<script>
    new Vue({
        el: '#root',
        data() {
            return {
            }
        },
    })
</script>

</html>